package com.zmn.uac.common.info.wechat;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zmn.uac.common.info.AuthLoginCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 类描述：微信用户授权手机号信息
 *
 * @author xujie
 * @since 2021/06/11 10:49
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("微信用户授权手机号信息")
public class WeChatUserAuthPhoneInfo extends AuthLoginCode implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "加密数据不能为空")
    @ApiModelProperty(value = "加密数据", required = true)
    private String encryptedData;

    @NotNull(message = "加密算法不能为空")
    @ApiModelProperty(value = "加密算法", required = true)
    private String iv;

    @JsonProperty("cloudID")
    @JSONField(name = "cloudID")
    @ApiModelProperty(value = "敏感数据对应的云 ID，开通云开发的小程序才会返回")
    private String cloudId;

    @ApiModelProperty(value = "deviceId设备信息", notes = "默认为 UTF-8")
    private String deviceId;
}
